gtk4.git
5 years agoRevert "Adwaita: avoid clipping menu/popover shadow"
Jakub Steiner [Tue, 17 Nov 2020 15:48:49 +0000 (16:48 +0100)]
Revert "Adwaita: avoid clipping menu/popover shadow"

There are big side effects to adding padding around all menus and popovers.

https://gitlab.gnome.org/GNOME/gtk/-/issues/1987#note_963889

This reverts commit d266bd62deaa5752ae79fe055696a9e1e411de2f.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 14:12:23 +0000 (14:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2851

5 years agowidget-factory: Remove an unused size group
Matthias Clasen [Tue, 17 Nov 2020 12:33:46 +0000 (07:33 -0500)]
widget-factory: Remove an unused size group

This was left behind when 361407201b88c3aae2ee removed
the unused popover that this size group applied to.

5 years agodocs: Fix the links for keybinding signals
Matthias Clasen [Tue, 17 Nov 2020 03:58:53 +0000 (22:58 -0500)]
docs: Fix the links for keybinding signals

GtkBindingSignal does not exist anymore, so link to
GtkSignalAction for an explanation of keybinding signals.

5 years agopopover: Document signals
Matthias Clasen [Tue, 17 Nov 2020 03:46:17 +0000 (22:46 -0500)]
popover: Document signals

5 years agomenubutton: Fix a gtk-doc complaint
Matthias Clasen [Tue, 17 Nov 2020 03:45:59 +0000 (22:45 -0500)]
menubutton: Fix a gtk-doc complaint

5 years agogtk: Fix a doc oversight
Matthias Clasen [Tue, 17 Nov 2020 03:39:13 +0000 (22:39 -0500)]
gtk: Fix a doc oversight

5 years agogsk: Fix a doc oversight
Matthias Clasen [Tue, 17 Nov 2020 03:36:11 +0000 (22:36 -0500)]
gsk: Fix a doc oversight

5 years agoMerge branch 'fix-gi-warning' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 12:31:36 +0000 (12:31 +0000)]
Merge branch 'fix-gi-warning' into 'master'

Fix a warning caused by difference between prototype and definition

See merge request GNOME/gtk!2849

5 years agoMerge branch 'wip/exalm/caption' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 12:22:29 +0000 (12:22 +0000)]
Merge branch 'wip/exalm/caption' into 'master'

widget-factory: Fix caption style class name

See merge request GNOME/gtk!2850

5 years agowidget-factory: Fix caption style class name
Alexander Mikhaylenko [Tue, 17 Nov 2020 08:16:47 +0000 (13:16 +0500)]
widget-factory: Fix caption style class name

It's lowercase.

5 years agoFix a warning caused by difference between prototype and definition
Qiu Wenbo [Tue, 17 Nov 2020 06:47:28 +0000 (14:47 +0800)]
Fix a warning caused by difference between prototype and definition

This commit fix the warning:

../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'

5 years agoMerge branch 'gsk-binding-api' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 05:36:15 +0000 (05:36 +0000)]
Merge branch 'gsk-binding-api' into 'master'

gsk: Avoid using gtk css types in public api

Closes #2454

See merge request GNOME/gtk!2848

5 years agogsk: Avoid using gtk css types in public api
Matthias Clasen [Tue, 17 Nov 2020 03:21:27 +0000 (22:21 -0500)]
gsk: Avoid using gtk css types in public api

Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.

To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.

Update all users.

Fixes: #2454
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 03:11:13 +0000 (03:11 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

popover: Fix submenu navigation

Closes #3301

See merge request GNOME/gtk!2847

5 years agopopover: Fix submenu navigation
Matthias Clasen [Tue, 17 Nov 2020 02:27:15 +0000 (21:27 -0500)]
popover: Fix submenu navigation

In commit 024d832d943b2abf4f0d, we introduced a
cascade-popdown property that makes closing a submenu
propagate up and close its parent menus. This is the
behavior we want when a menuitem in the submen is
activated.

What we overlooked is that we still need to be able to
close a submenu during navigation, before opening another
one. And in this case, propagating the closing is breaking
things. Fix this by adding a private close_submenu api
to GtkPopoverMenu that avoids the propagation.

Fixes: #3301
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 17 Nov 2020 01:07:34 +0000 (01:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2846

5 years agoMerge branch 'ebassi/for-master' into 'master'
Emmanuele Bassi [Mon, 16 Nov 2020 23:06:55 +0000 (23:06 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

See merge request GNOME/gtk!2840

5 years agowidget-factory: Remove an unused popover
Matthias Clasen [Mon, 16 Nov 2020 20:22:12 +0000 (15:22 -0500)]
widget-factory: Remove an unused popover

We are no longer using the hand-rolled variant of that
popover on page 3, so drop it from the ui file.

5 years agoMerge branch 'wip/exalm/button' into 'master'
Matthias Clasen [Mon, 16 Nov 2020 20:16:10 +0000 (20:16 +0000)]
Merge branch 'wip/exalm/button' into 'master'

Allow pressing multiple buttons at once on touch

See merge request GNOME/gtk!2813

5 years agoMerge branch 'wip/jimmac/popover-menu-submenus' into 'master'
Jakub Steiner [Mon, 16 Nov 2020 19:50:08 +0000 (19:50 +0000)]
Merge branch 'wip/jimmac/popover-menu-submenus' into 'master'

Adwaita: fix up submenus again

See merge request GNOME/gtk!2845

5 years agoMerge branch 'wip/chergert/for-master' into 'master'
Matthias Clasen [Mon, 16 Nov 2020 19:20:19 +0000 (19:20 +0000)]
Merge branch 'wip/chergert/for-master' into 'master'

gsk: use glFrameBufferTexture2D and release texture

See merge request GNOME/gtk!2842

5 years agoMerge branch 'wip/jimmac/circular-button-focus' into 'master'
Jakub Steiner [Mon, 16 Nov 2020 18:55:30 +0000 (18:55 +0000)]
Merge branch 'wip/jimmac/circular-button-focus' into 'master'

Adwaita: circular button focus

Closes #3368

See merge request GNOME/gtk!2844

5 years agoAdwaita: fix up submenus again
Jakub Steiner [Mon, 16 Nov 2020 18:48:11 +0000 (19:48 +0100)]
Adwaita: fix up submenus again

- move menubar section under more generic popover.menu
  rather than resort to specificity dir(ltr) hacks

5 years agoAdwaita: circular button focus
Jakub Steiner [Mon, 16 Nov 2020 18:04:07 +0000 (19:04 +0100)]
Adwaita: circular button focus

- have the same focus look like the other items

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3368

5 years agoMerge branch 'wip/jimmac/spinbutton-spacing' into 'master'
Matthias Clasen [Mon, 16 Nov 2020 17:50:56 +0000 (17:50 +0000)]
Merge branch 'wip/jimmac/spinbutton-spacing' into 'master'

Adwaita: spinbutton spacing

Closes #3370

See merge request GNOME/gtk!2841

5 years agoa11y: Ensure valid object paths in the fallback code
Emmanuele Bassi [Mon, 16 Nov 2020 17:28:22 +0000 (17:28 +0000)]
a11y: Ensure valid object paths in the fallback code

When falling back to using the program name to create a unique base path
for the objects on the accessibility bus we need to ensure that the name
is a valid DBus object path.

5 years agogsk: use glFrameBufferTexture2D and release texture
Christian Hergert [Mon, 16 Nov 2020 17:26:07 +0000 (09:26 -0800)]
gsk: use glFrameBufferTexture2D and release texture

glFrameBufferTexture maps to all faces of a cube and that is not needed
here. Additionally, texture_id is not deleted after we use the additional
flipped texture, but should be.

5 years agoAdwaita: spinbutton spacing
Jakub Steiner [Mon, 16 Nov 2020 17:22:17 +0000 (18:22 +0100)]
Adwaita: spinbutton spacing

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3370

5 years agoa11y: Implement atspi.Cache
Emmanuele Bassi [Mon, 16 Nov 2020 15:23:37 +0000 (15:23 +0000)]
a11y: Implement atspi.Cache

The AT-SPI cache interface is used to quickly populate the accessible
objects tree.

The tricky bit is ensuring that we emit change notifications on the
cache only when the cache is available, which means waiting until the
root is asynchronously registered.

5 years agoa11y: Update the Cache interface introspection
Emmanuele Bassi [Mon, 16 Nov 2020 15:22:33 +0000 (15:22 +0000)]
a11y: Update the Cache interface introspection

The type for cached items is, unsurprisingly, wrong when compared to the
implementation inside atk-spi2-atk.

5 years agoa11y: Add getters for GtkAtSpiContext
Emmanuele Bassi [Mon, 16 Nov 2020 15:21:58 +0000 (15:21 +0000)]
a11y: Add getters for GtkAtSpiContext

We are going to use them in order to implement atspi.Cache.

5 years agoa11y: Use the tab widget to label the notebook stack page
Emmanuele Bassi [Mon, 16 Nov 2020 14:25:02 +0000 (14:25 +0000)]
a11y: Use the tab widget to label the notebook stack page

5 years agoa11y: Compute the base path in the root object
Emmanuele Bassi [Mon, 16 Nov 2020 14:17:28 +0000 (14:17 +0000)]
a11y: Compute the base path in the root object

The root path is shared by all AtSpiContext instances, so we should
compute it once, instead of every time we instantiate a new context.

This allows us to defer the path creation at realization time and ensure
that we have a registered application.

5 years agoa11y: Resync the AT-SPI XML
Emmanuele Bassi [Thu, 12 Nov 2020 23:26:03 +0000 (23:26 +0000)]
a11y: Resync the AT-SPI XML

Mostly just changes in the annotations coming from at-spi2-core, but
it's good to try and keep the XML in sync.

5 years agoMerge branch 'wip/jimmac/circular-button-padding' into 'master'
Jakub Steiner [Mon, 16 Nov 2020 14:50:16 +0000 (14:50 +0000)]
Merge branch 'wip/jimmac/circular-button-padding' into 'master'

Adwaita: circular buttons

See merge request GNOME/gtk!2838

5 years agodocs: Mention cairo-gobject as build requires
Matthias Clasen [Mon, 16 Nov 2020 14:29:10 +0000 (09:29 -0500)]
docs: Mention cairo-gobject as build requires

Using cairo from a system dependency and cairo-gobject
as subproject is problematic and left me stuck on a
hard-to-understand build error.

5 years agoAdwaita: circular buttons
Jakub Steiner [Mon, 16 Nov 2020 14:21:46 +0000 (15:21 +0100)]
Adwaita: circular buttons

- the vertical padding was thown off with the chin/forehead of menus removed

5 years agoMerge branch 'wip/jimmac/menu-clipped-shadow' into 'master'
Jakub Steiner [Mon, 16 Nov 2020 14:10:21 +0000 (14:10 +0000)]
Merge branch 'wip/jimmac/menu-clipped-shadow' into 'master'

Wip/jimmac/menu clipped shadow

Closes #1987

See merge request GNOME/gtk!2837

5 years agoAdwaita: avoid clipping menu/popover shadow
Jakub Steiner [Mon, 16 Nov 2020 13:20:24 +0000 (14:20 +0100)]
Adwaita: avoid clipping menu/popover shadow

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987

5 years agogsk: Fix some docs oversights
Matthias Clasen [Mon, 16 Nov 2020 12:43:06 +0000 (07:43 -0500)]
gsk: Fix some docs oversights

These apis have been renamed a few times, and the docs
haven't kept up.

5 years agogdk: Docs cosmetics
Matthias Clasen [Mon, 16 Nov 2020 12:40:05 +0000 (07:40 -0500)]
gdk: Docs cosmetics

Add a few missing parameters in doc comments.

5 years agodocs: Fix a typo
Matthias Clasen [Mon, 16 Nov 2020 12:37:33 +0000 (07:37 -0500)]
docs: Fix a typo

5 years agodocs: Remove gtk_render_insertion_cursor
Matthias Clasen [Mon, 16 Nov 2020 12:35:41 +0000 (07:35 -0500)]
docs: Remove gtk_render_insertion_cursor

This function was removed in 2bcef7f03058dac7cbac.

5 years agoAdwaita: remove chin on menus
Jakub Steiner [Mon, 16 Nov 2020 12:31:27 +0000 (13:31 +0100)]
Adwaita: remove chin on menus

- clipping a rounded corner seems to be working fine for first and last item.

Addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/3366

5 years agoMerge branch 'wip/jimmac/subtle-sidebar' into 'master'
Jakub Steiner [Mon, 16 Nov 2020 09:34:36 +0000 (09:34 +0000)]
Merge branch 'wip/jimmac/subtle-sidebar' into 'master'

Adwaita: navigation sidebar color changes

Closes #3362

See merge request GNOME/gtk!2836

5 years agoAdwaita: navigation sidebar color changes
Jakub Steiner [Fri, 13 Nov 2020 17:24:10 +0000 (18:24 +0100)]
Adwaita: navigation sidebar color changes

- use more subtle selected state grey

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3362

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 16 Nov 2020 04:29:10 +0000 (04:29 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2835

5 years agogtk-demo: Plug a memory leak
Matthias Clasen [Mon, 16 Nov 2020 04:03:30 +0000 (23:03 -0500)]
gtk-demo: Plug a memory leak

The Characters demo was leaking its columns.

5 years agomodelbutton: Fix keynav for check and radio
Matthias Clasen [Mon, 16 Nov 2020 02:52:07 +0000 (21:52 -0500)]
modelbutton: Fix keynav for check and radio

The expected behavior when activating check or radio
menuitems via keynav is that Space toggles the item
but keeps the menu open, while Return toggles the
item and closes the menu.

5 years agoMerge branch 'fix-tooltip-trigger' into 'master'
Matthias Clasen [Sun, 15 Nov 2020 17:37:47 +0000 (17:37 +0000)]
Merge branch 'fix-tooltip-trigger' into 'master'

Fix tooltip triggering

See merge request GNOME/gtk!2833

5 years agoFix tooltip triggering
Matthias Clasen [Sun, 15 Nov 2020 14:34:25 +0000 (09:34 -0500)]
Fix tooltip triggering

Ever since 5b5d2665d373c35f, tooltips don't work properly,
since we get more motion events now, and those keep the
tooltips from appearing. This can be seen e.g. on the icon
in the password entry in widget-factory, or on the section
switcher buttons in the Emoji chooser.

Ignore synthetic motion events for the purposes of
determining whether the user moved the mouse.

5 years agoMerge branch 'widget-no-a11y-crash' into 'master'
Emmanuele Bassi [Sun, 15 Nov 2020 15:23:42 +0000 (15:23 +0000)]
Merge branch 'widget-no-a11y-crash' into 'master'

gtkwidget: fix crashes with GTK_A11Y=none

Closes #3333

See merge request GNOME/gtk!2834

5 years agogtkwidget: fix crashes with GTK_A11Y=none
Christoph Reiter [Sun, 15 Nov 2020 14:59:31 +0000 (15:59 +0100)]
gtkwidget: fix crashes with GTK_A11Y=none

at_context can be NULL in that case, so guard against it.

Fixes #3333

5 years agoMerge branch 'button-fill-var-removal' into 'master'
Matthias Clasen [Sun, 15 Nov 2020 13:45:42 +0000 (13:45 +0000)]
Merge branch 'button-fill-var-removal' into 'master'

Adwaita: Stop using $button_fill

Closes #3354

See merge request GNOME/gtk!2828

5 years agoMerge branch 'parse-debug-env-vars-always' into 'master'
Matthias Clasen [Sun, 15 Nov 2020 13:37:44 +0000 (13:37 +0000)]
Merge branch 'parse-debug-env-vars-always' into 'master'

Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode

See merge request GNOME/gtk!2830

5 years agoRevert "Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model...
Christoph Reiter [Sun, 15 Nov 2020 12:36:35 +0000 (13:36 +0100)]
Revert "Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified."

This reverts commit 1340ff2bc279329dc16b8d823100fec46b2f11d8.

Same as with 53cd499621b5

5 years agoAlways parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug...
Christoph Reiter [Sat, 14 Nov 2020 07:49:17 +0000 (08:49 +0100)]
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode

Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.

This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 15 Nov 2020 08:01:26 +0000 (08:01 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'wip/carlosg/for-master' into 'master'
Matthias Clasen [Sat, 14 Nov 2020 14:41:01 +0000 (14:41 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'

gtk/main: Reset active state on grab broken only if implicit

See merge request GNOME/gtk!2832

5 years agogtk/main: Reset active state on grab broken only if implicit
Carlos Garnacho [Sat, 14 Nov 2020 09:48:04 +0000 (10:48 +0100)]
gtk/main: Reset active state on grab broken only if implicit

An implicit grab means some button is down, reset the active state
only in that case when we get a grab broken event.

Avoids active state accounting warnings when we do get active grabs
broken (e.g. after selecting a menu option).

5 years agoAdwaita: Stop using $button_fill
nana-4 [Sat, 14 Nov 2020 00:57:55 +0000 (09:57 +0900)]
Adwaita: Stop using $button_fill

Since the $button_fill variables are no longer used outside of the
button() mixin (and it was for an ugly hack), there is no need to keep
that anymore.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 14 Nov 2020 00:15:34 +0000 (00:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3359 and #3353

See merge request GNOME/gtk!2827

5 years agoAdwaita: Fix list separators
Matthias Clasen [Fri, 13 Nov 2020 22:18:05 +0000 (17:18 -0500)]
Adwaita: Fix list separators

Commit bfe5b0d1b7a1374964 ran into some specificity
trouble.

Fixes: #3353
5 years agolabel: Avoid short-circuiting
Matthias Clasen [Fri, 13 Nov 2020 20:35:51 +0000 (15:35 -0500)]
label: Avoid short-circuiting

Commit 0db504edde63eb77e made a mistake described here:
https://en.wikipedia.org/wiki/Short-circuit_evaluation#Possible_problems

Fixes: #3359
5 years agoMerge branch 'alatiera/nightly-demos' into 'master'
Matthias Clasen [Fri, 13 Nov 2020 19:28:44 +0000 (19:28 +0000)]
Merge branch 'alatiera/nightly-demos' into 'master'

ci: publish demo apps to the Nightly repository

See merge request GNOME/gtk!2825

5 years agoMerge branch 'wip/jimmac/tooltips' into 'master'
Matthias Clasen [Fri, 13 Nov 2020 19:23:58 +0000 (19:23 +0000)]
Merge branch 'wip/jimmac/tooltips' into 'master'

Adwaita: tooltip styling

Closes #3352

See merge request GNOME/gtk!2826

5 years agoci: publish demo apps to the Nightly repository
Jordan Petridis [Fri, 13 Nov 2020 18:00:17 +0000 (20:00 +0200)]
ci: publish demo apps to the Nightly repository

5 years agoAdwaita: tooltip styling
Jakub Steiner [Fri, 13 Nov 2020 18:36:26 +0000 (19:36 +0100)]
Adwaita: tooltip styling

- balance padding
- increase border radius, yuck
- get rid of text shadow

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3352

5 years agoMerge branch 'wip/jimmac/submenus' into 'master'
Jakub Steiner [Fri, 13 Nov 2020 17:05:00 +0000 (17:05 +0000)]
Merge branch 'wip/jimmac/submenus' into 'master'

Wip/jimmac/submenus

See merge request GNOME/gtk!2824

5 years agoMerge branch 'wip/jimmac/declare-buttonfill-once' into 'master'
Jakub Steiner [Fri, 13 Nov 2020 16:57:18 +0000 (16:57 +0000)]
Merge branch 'wip/jimmac/declare-buttonfill-once' into 'master'

Adwaita: double declated $button_fill

See merge request GNOME/gtk!2823

5 years agoAdwaita: rounded submenus
Jakub Steiner [Tue, 29 Sep 2020 10:54:25 +0000 (12:54 +0200)]
Adwaita: rounded submenus

- all corners have rounded corners

See https://gitlab.gnome.org/GNOME/gtk/-/issues/2745

5 years agoAdwaita: double declared $button_fill
Jakub Steiner [Fri, 13 Nov 2020 16:21:03 +0000 (17:21 +0100)]
Adwaita: double declared $button_fill

- this was already in place in _common, no need to have it in _colors

5 years agoAdwaita: double declated $button_fill
Jakub Steiner [Fri, 13 Nov 2020 16:21:03 +0000 (17:21 +0100)]
Adwaita: double declated $button_fill

- this was already in place in _common, no need to have it in _colors

5 years agoMerge branch 'wip/exalm/window' into 'master'
Jakub Steiner [Fri, 13 Nov 2020 15:33:15 +0000 (15:33 +0000)]
Merge branch 'wip/exalm/window' into 'master'

Round window corners

See merge request GNOME/gtk!1952

5 years agoMerge branch 'wip/carlosg/for-master' into 'master'
Matthias Clasen [Fri, 13 Nov 2020 04:13:34 +0000 (04:13 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'

Improve handling of ::active with touch and multiple foci

Closes #3348

See merge request GNOME/gtk!2821

5 years agogtk/main: Stack ::active calls
Carlos Garnacho [Thu, 12 Nov 2020 23:23:52 +0000 (00:23 +0100)]
gtk/main: Stack ::active calls

We may have the situation of multiple touchpoints in the same
widget, or combinations with other devices. Stack those ::active
states are preserved on widgets on all but the last pointer/touch
going away.

5 years agogtk/main: Toggle active flag with touch events
Carlos Garnacho [Thu, 12 Nov 2020 16:31:52 +0000 (17:31 +0100)]
gtk/main: Toggle active flag with touch events

This went missing at some point, add the missing toggling of active
state with GDK_TOUCH_BEGIN/END/CANCEL events.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3348
5 years agoMerge branch 'ebassi/for-master' into 'master'
Emmanuele Bassi [Thu, 12 Nov 2020 22:22:20 +0000 (22:22 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

See merge request GNOME/gtk!2819

5 years agoa11y: Use GROUP role for ShortcutsShortcut
Emmanuele Bassi [Thu, 12 Nov 2020 21:12:56 +0000 (21:12 +0000)]
a11y: Use GROUP role for ShortcutsShortcut

And hide the image from the accessible tree.

5 years agoa11y: Implement atspi.Text.ScrollSubstringTo for GtkTextView
Emmanuele Bassi [Thu, 12 Nov 2020 20:57:56 +0000 (20:57 +0000)]
a11y: Implement atspi.Text.ScrollSubstringTo for GtkTextView

We reuse the existing implementation in GTK3.

5 years agoa11y: Document GtkRevealer's accessible state
Emmanuele Bassi [Thu, 12 Nov 2020 16:19:14 +0000 (16:19 +0000)]
a11y: Document GtkRevealer's accessible state

Use the GROUP role, and make sure to note that the child is always
revealed. Unlike GtkExpander, GtkRevealer can only be programmatically
toggled, so we cannot turn it into a "button" object.

5 years agoa11y: Add more accessible data to GtkTreeExpander
Emmanuele Bassi [Thu, 12 Nov 2020 16:16:48 +0000 (16:16 +0000)]
a11y: Add more accessible data to GtkTreeExpander

Document the role of the GtkTreeExpander, and the behaviour of the
expander button.

Additionally, improve the label of the expander button, by adding a
fixed "Expand" label, and setting the "labelled-by" relation to the
child of the GtkTreeExpander.

5 years agoEstablish a control relation between demo search and list
Emmanuele Bassi [Thu, 12 Nov 2020 16:12:03 +0000 (16:12 +0000)]
Establish a control relation between demo search and list

The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.

5 years agoa11y: Add accessible actions to GtkSearchEntry
Emmanuele Bassi [Thu, 12 Nov 2020 16:05:31 +0000 (16:05 +0000)]
a11y: Add accessible actions to GtkSearchEntry

Just like GtkPasswordEntry, GtkSearchEntry should have its set of
accessible actions.

5 years agoa11y: Mark SearchEntry icons as presentational
Emmanuele Bassi [Thu, 12 Nov 2020 16:04:30 +0000 (16:04 +0000)]
a11y: Mark SearchEntry icons as presentational

While the "clear the search entry" icon behaves like a button, we don't
have any actual action that can trigger it, so let's ignore it.

5 years agoa11y: Set the role on GtkSearchBar
Emmanuele Bassi [Thu, 12 Nov 2020 14:54:39 +0000 (14:54 +0000)]
a11y: Set the role on GtkSearchBar

The search bar widget has a "SEARCH" landmark role, which is described
as:

    A landmark region that contains a collection of items and
    objects that, as a whole, combine to create a search facility.

5 years agoa11y: Icons in buttons are presentational
Emmanuele Bassi [Thu, 12 Nov 2020 14:53:16 +0000 (14:53 +0000)]
a11y: Icons in buttons are presentational

Buttons are described by text, and the icon child can be safely ignored.

5 years agoa11y: Add more accessibility labels to GtkNotebook
Emmanuele Bassi [Thu, 12 Nov 2020 14:51:58 +0000 (14:51 +0000)]
a11y: Add more accessibility labels to GtkNotebook

Label the various components:

 - the tab list
 - the tab widget
 - the arrow widgets

5 years agoa11y: Use the stack page title as its accessible label
Emmanuele Bassi [Thu, 12 Nov 2020 14:50:49 +0000 (14:50 +0000)]
a11y: Use the stack page title as its accessible label

5 years agoa11y: GtkStack is a group of stack pages
Emmanuele Bassi [Thu, 12 Nov 2020 14:50:35 +0000 (14:50 +0000)]
a11y: GtkStack is a group of stack pages

5 years agoHandle empty stack pages when creating an ATContext
Emmanuele Bassi [Thu, 12 Nov 2020 16:48:03 +0000 (16:48 +0000)]
Handle empty stack pages when creating an ATContext

If we don't have a widget inside GtkStackPage, we should use the default
GdkDisplay.

5 years agoUnrealize the ATContext in StackPage on dispose
Emmanuele Bassi [Thu, 12 Nov 2020 14:49:16 +0000 (14:49 +0000)]
Unrealize the ATContext in StackPage on dispose

Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.

5 years agoa11y: Icons in WindowControls are presentational only
Emmanuele Bassi [Thu, 12 Nov 2020 14:48:15 +0000 (14:48 +0000)]
a11y: Icons in WindowControls are presentational only

They don't contribute anything to the accessible description.

5 years agoa11y: Ignore more structural roles when computing labels
Emmanuele Bassi [Thu, 12 Nov 2020 14:38:01 +0000 (14:38 +0000)]
a11y: Ignore more structural roles when computing labels

These roles should not have a fallback name when explicitly unlabelled.

5 years agoa11y: Add role exception for GtkScrolledWindow
Emmanuele Bassi [Thu, 12 Nov 2020 14:37:21 +0000 (14:37 +0000)]
a11y: Add role exception for GtkScrolledWindow

ARIA does not have a "scroll pane" role, but AT-SPI does.

5 years agodemo: Add more accessibility labels to the UI
Emmanuele Bassi [Thu, 12 Nov 2020 14:36:59 +0000 (14:36 +0000)]
demo: Add more accessibility labels to the UI

5 years agoMerge branch 'clear-search-entry' into 'master'
Matthias Clasen [Thu, 12 Nov 2020 19:25:57 +0000 (19:25 +0000)]
Merge branch 'clear-search-entry' into 'master'

searchbar: Fix clearing search entry on hide

See merge request GNOME/gtk!2820

5 years agosearchbar: Fix clearing search entry on hide
Florian Müllner [Thu, 12 Nov 2020 18:04:42 +0000 (19:04 +0100)]
searchbar: Fix clearing search entry on hide

Commit fa3d1940bf2b36 added separate grab handling for GtkSearchEntry, but
didn't consider whether the bar was revealed or concealed. The expected
behavior for the latter is that the entry is cleared rather than focused,
fix the condition accordingly.

5 years agotheme: Round all window corners
Alexander Mikhaylenko [Thu, 12 Nov 2020 17:19:00 +0000 (22:19 +0500)]
theme: Round all window corners